package namespace;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;
public class drawFunc1 extends JFrame 
{
	public drawFunc1(double tt,double NN)
	{
		setTitle("Second graphics");
		setSize(1000,600);
		//N  naturalne, tobto>=0 T
		double n=NN;// naturalne, tobto>=0
		double v=60.0; //0<v<60
		double t=tt;//-10<t<10
		int a=60;//naturalne, tobto>=0
		Function1 func1=new Function1(n,t);
	    func1.func();
	    DrawAxis1 axis1 = new DrawAxis1(func1.xArray(),func1.yArray(),func1.len());//я переробила твій метод з 
	    add(axis1);
	    JPanel p1 = new JPanel();
	    JButton b1 = new JButton("Go to main menu ");
	    p1.add(b1);
	    add(p1,BorderLayout.SOUTH);
	    b1.addActionListener(new ActionListener()
	    {
	    	public void actionPerformed(ActionEvent e)
	    	{
	    		setVisible(false);
	    	}
	    });

	}
}
